package com.xiaoqiudong.forum.exception;

import com.xiaoqiudong.forum.common.AppResult;

/**
 * Created with IntelliJ IDEA
 * Descroption
 * User:dell
 * Date:2025-08-22
 * Time:14:50
 */
public class ApplicationException extends RuntimeException{
    protected AppResult errorResult;

    /**
     * 构造方法
     * @param errorResult
     */

    public ApplicationException(AppResult errorResult){
        super(errorResult.getMessage());
        this.errorResult = errorResult;
    }

    public ApplicationException(String message) {
        super(message);
    }

    public ApplicationException(String message, Throwable cause) {
        super(message, cause);
    }

    public ApplicationException(Throwable cause) {
        super(cause);
    }

    public AppResult getErrorResult() {
        return errorResult;
    }
}
